cmdclass = {"build_ext": BuildExtensions}
compiler_directives = {"freethreading_compatible": True}
- abi3_macros = []
- abi3_ext_kwargs = {}
- abi3_cflags = ""
- if platform.python_implementation() == "CPython" and not is_freethreaded():
- abi3_macros.append(("Py_LIMITED_API", "0x030B0000")) # 3.11
- abi3_cflags = f"-D{'='.join(abi3_macros[-1])}"
- abi3_ext_kwargs["py_limited_api"] = True
- cmdclass["bdist_wheel"] = bdist_wheel_abi3
+ # abi3_macros = []
+ # abi3_ext_kwargs = {}
+ # abi3_cflags = ""
+ # if platform.python_implementation() == "CPython" and not is_freethreaded():
+ # abi3_macros.append(("Py_LIMITED_API", "0x030B0000")) # 3.11
+ # abi3_cflags = f"-D{'='.join(abi3_macros[-1])}"
+ # abi3_ext_kwargs["py_limited_api"] = True
+ # cmdclass["bdist_wheel"] = bdist_wheel_abi3
def get_cython_extfiles(extnames):
extdir = Path("tables")
# it would be nice to have an option or something to pass here, but
# there doesn't seem to be one according to the docs, so temporarily set
# the env var instead
- orig_cflags = os.getenv("CFLAGS", None)
- cflags = (
- f"{orig_cflags} {abi3_cflags}"
- if orig_cflags
- else abi3_cflags
- )
- os.environ["CFLAGS"] = cflags
+ # orig_cflags = os.getenv("CFLAGS", None)
+ # cflags = (
+ # f"{orig_cflags} {abi3_cflags}"
+ # if orig_cflags
+ # else abi3_cflags
+ # )
+ # os.environ["CFLAGS"] = cflags
try:
cythonize(
str(extpfile),
language_level="2",
)
finally:
- if orig_cflags is not None:
- os.environ["CFLAGS"] = orig_cflags
- else:
- del os.environ["CFLAGS"]
+ # if orig_cflags is not None:
+ # os.environ["CFLAGS"] = orig_cflags
+ # else:
+ # del os.environ["CFLAGS"]
+ pass
extfiles[extname] = extcfile
return extfiles
"define_macros": def_macros,
"include_dirs": inc_dirs,
}
- def_macros.extend(abi3_macros)
- extension_kwargs.update(abi3_ext_kwargs)
+ # def_macros.extend(abi3_macros)
+ # extension_kwargs.update(abi3_ext_kwargs)
extensions = [
Extension(